<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>nike购物车</title>
    <script src="../js/jquery.min.js"></script>
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../font_22q6xzovj1l/iconfont.css">
    <script src="../js/index.js"></script>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/index.css">
    <link rel="stylesheet" href="../css/goods.css">
    <link rel="stylesheet" href="../css/shopcar.css">
</head>

<body>
    <!-- header -->
    <nav class="gnav">
        <div class="nav-top">
            <!-- nav-topleft -->
            <ul class="nav-topleft">
                <li class="logo1">
                    <a href="#">
                        <span class="facet-label">
                                          NikePlus 
                                        </span>
                    </a>
                </li>
                <li class="logo2">
                    <a href="#">
                        <span class="logo-jordan iconfont"> &#xe602;</span>
                    </a>
                </li>
                <li class="logo3">
                    <a href="#">
                        <span class="logo-converse">converse *> </span>
                    </a>
                </li>
            </ul>
            <!-- nav-topright -->
            <script src="../../lib/cookie.js"></script>
            <script src="../js/shopcar.js"></script>
            <ul class="nav-topright">
                <script>
                    $(function() {
                        if (cookie.get('isLogin')) {
                            let username = document.getElementById('_islogin');
                            username.innerHTML = `${cookie.get('username')}`; //得到登录用户的username
                            let join_vip = $('.join_vip');
                            join_vip.attr('style', 'display:none');
                        } else {
                            let loginout = document.getElementById('loginout');
                            // console.log(loginout);
                            loginout.setAttribute('style', 'display:none;');
                        }
                    });
                </script>
                <li class="login">
                    <a data-toggle="modal" data-target="#myModal_login" id="_islogin">
                                加入/登录Nike⁠Plus账号</a>
                </li>
                <li id="loginout"><a href="">退出登录</a></li>
                <script>
                    var out = document.getElementById('loginout');
                    out.onclick = function() {
                            console.log(666);
                            cookie.remove('isLogin'); //清除cookie
                            location.reload(); //重新加载页面
                            return false; //阻止a标签默认行为
                        }
                        // username.innerHTML = cookie.get('username'); //得到登录用户的username
                </script>
                <li class="help">
                    <a href="#">帮助</a>
                    <ul class="help-nav">
                        <li>我的订单</li>
                        <li>我的订单</li>
                        <li>我的订单</li>
                        <li>我的订单</li>
                        <li>我的订单</li>
                    </ul>
                </li>
                <li class="xiaoxi iconfont">
                    <a href="#" class="iconfont">&#xe615;</a>
                </li>
                <li class="shopcar ">
                    <a href="./shopcar.html" class="iconfont">&#xe502;</a>
                </li>
                <li class="china ">
                    <a href="#" style="color:red" class="iconfont">&#xe621;</a>
                </li>
            </ul>
        </div>
        <div class="nav-bottom">
            <div class="home">
                <a href="index.html"><img src="../img/home.png" alt="home"></a>
            </div>
            <ul>
                <li><a href="#">男子</a> </li>
                <li>女子</li>
                <li>男孩</li>
                <li>女孩</li>
                <li>专属订制</li>
                <li>流行潮品</li>
            </ul>
            <!-- 隐藏选项卡 -->


            <!-- 搜索框 -->

        </div>
    </nav>

    <!-- main -->
    <section id="shopcar">
        <div class="container">
            <div class="row">
                <div class="col-md-8 left_box">
                    <div class="join_vip">
                        <h2>会员可享受免费配送服务。</h2>
                        <h3>加入 NikePlus，尊享免费快速配送服务。
                            <span data-toggle="modal" data-target="#myModal_login">立即加入或登录</span>
                        </h3>
                    </div>
                    <h4>购物车</h4>
                    <div class="shopcarlist">


                    </div>
                </div>
                <div class="col-md-4 right_box">
                    <div class="abstract">
                        <p>摘要</p>
                        <p>您有促销代码吗？</p>
                        <p class="allprice">小计<i></i></p>
                        <p>预计配送和处理￥0.00</p>
                        <p class="allprice">总计</p>
                        <button class="pay">结算<i></i></button>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- footer -->
    <footer>
        <div class="footer_container">
            <div class="footer_nav">
                <ul class="footer_nav_left">
                    <li>电子礼品卡</li>
                    <li>附近商店</li>
                    <li>订阅电子邮件</li>
                    <li>注册nike会员</li>
                    <li>网站反馈</li>
                </ul>
                <ul class="footer_nav_mid">
                    <li style="font-size: 14px;
                    color: #FFF;">获取帮助</li>
                    <li>订单状态</li>
                    <li>配送方式</li>
                    <li>退换货</li>
                    <li>付款选项</li>
                    <li>联系我们</li>
                </ul>
                <ul class="footer_nav_right">
                    <li style="font-size: 14px;
                    color: #FFF;">关于NIKE</li>
                    <li>新闻</li>
                    <li>投资者</li>
                    <li>招贤纳士</li>
                    <li>新品预览</li>
                    <li>企业团购</li>
                </ul>
                <span>
                    <i>
                        微信
                        <img src="../img/WeChat_QR_Code_Footer.jpg" alt="">
                    </i>
                    <i>微博</i>                   
                </span>
            </div>
            <div class="footer_bot">
                <div class="footer_bot_left">
                    <i style="color:red" class="iconfont">&#xe621;</i>
                    <i style="color:#fff;">中国</i>
                    <i style="padding-left:20px">© 2019 Nike, Inc. 保留所有权利</i>
                </div>
                <div class="footer_bot_right">
                    <ul>
                        <li>分类浏览</li>
                        <li>使用条款</li>
                        <li>销售条款</li>
                        <li>隐私政策</li>
                        <li>沪ICP备14009339号</li>
                        <li>上海工商</li>
                        <li>沪公网安备31011002000177号</li>
                    </ul>
                </div>
            </div>
        </div>
    </footer>
    <!-- 登录注册页面 -->
    <div class="modal fade login" id="myModal_login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <!-- 右上角❌ -->
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="width:20px;position: absolute;right: 0;">&times;
                </button>
                <!-- 登录界面 -->
                <div id="login">
                    <div class="login_box">
                        <div class="nike-unite-swoosh"></div>
                        <div class="view-header">登录NIKE⁠+账号</div>
                        <form action="../../lib/login.php" method="POST">
                            <input type="text" name="uname" placeholder="请输入用户名" class="phone">
                            <br>
                            <br>
                            <input type="password" name="pwd" placeholder="请输入密码" autocomplete="off">
                            <br>
                            <!-- <div class="dzyj">使用电子邮件登录。</div> -->
                            <p class="terms">一旦登录，即表明你同意 Nike 的隐私政策</a> 和使用条款</p>
                            <input class="_login" type="submit" value="登录">
                            <br>
                            <div class="_reg">
                                <a href="#">还不是会员？立即加入</a>
                            </div>
                        </form>

                    </div>
                    <!-- 注册页面 -->
                    <div class="reg_box">
                        <div class="nike-unite-swoosh"></div>
                        <div class="view-header">创建您的NIKE账户</div>
                        <p class="terms">我们需要验证您的号码以继续操作。</p>
                        <form action="../../lib/reg.php" method="POST">
                            <input type="text" id="username" name="uname" placeholder="请输入用户名" class="phone">
                            <br>
                            <span id="hasuser"></span>
                            <br>
                            <input type="password" id="password" name="pwd" placeholder="请输入密码" autocomplete="on">
                            <br>
                            <input type="text" id="email" name="email" placeholder="请输入邮箱">
                            <br>
                            <input class="_login" type="submit" value="注册">
                            <br>
                            <div class="_log">
                                <a href="#">已经使会员？立即登录</a>
                            </div>
                        </form>
                    </div>


                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal -->
    </div>
</body>

</html>